USE [OctoNetApps]
GO

/****** Object:  StoredProcedure [classified].[ClassifiedAttributeValues_Delete]    Script Date: 05/25/2011 07:00:59 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO




CREATE PROCEDURE [classified].[ClassifiedAttributeValues_Delete]
	@CategoryID bigint,
	@AttributeID bigint,
	@AttributeValue tinyint
AS
BEGIN

	SET NOCOUNT ON;
	
BEGIN TRY
	
		BEGIN TRANSACTION TR
	
	DELETE FROM classified.ClassifiedAdsAttributeValues
	WHERE CategoryID = @CategoryID AND AttributeID = @AttributeID AND AttributeValue = @AttributeValue
	
	DELETE FROM classified.ClassifiedAttributeValues
	WHERE CategoryID = @CategoryID AND AttributeID = @AttributeID AND AttributeValue = @AttributeValue
	
		COMMIT TRANSACTION TR
    END TRY
    BEGIN CATCH
		ROLLBACK TRANSACTION TR
    END CATCH
END






GO


